package com.ybkj.o2o.zhuanxian.entity;

import java.io.Serializable;

public class CarAndLine implements Serializable {

  private Long carId;

  private String carName;

  private Long lineId;

  private String lineName;

  private static final long serialVersionUID = 1L;

  public Long getCarId() {
    return carId;
  }

  public void setCarId(Long carId) {
    this.carId = carId;
  }

  public String getCarName() {
    return carName;
  }

  public void setCarName(String carName) {
    this.carName = carName == null ? null : carName.trim();
  }

  public Long getLineId() {
    return lineId;
  }

  public void setLineId(Long lineId) {
    this.lineId = lineId;
  }

  public String getLineName() {
    return lineName;
  }

  public void setLineName(String lineName) {
    this.lineName = lineName == null ? null : lineName.trim();
  }

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    CarAndLine other = (CarAndLine) that;
    return (this.getCarId() == null ? other.getCarId() == null : this.getCarId().equals(
        other.getCarId()))
        && (this.getCarName() == null ? other.getCarName() == null : this.getCarName().equals(
            other.getCarName()))
        && (this.getLineId() == null ? other.getLineId() == null : this.getLineId().equals(
            other.getLineId()))
        && (this.getLineName() == null ? other.getLineName() == null : this.getLineName().equals(
            other.getLineName()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getCarId() == null) ? 0 : getCarId().hashCode());
    result = prime * result + ((getCarName() == null) ? 0 : getCarName().hashCode());
    result = prime * result + ((getLineId() == null) ? 0 : getLineId().hashCode());
    result = prime * result + ((getLineName() == null) ? 0 : getLineName().hashCode());
    return result;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName());
    sb.append(" [");
    sb.append("Hash = ").append(hashCode());
    sb.append(", carId=").append(carId);
    sb.append(", carName=").append(carName);
    sb.append(", lineId=").append(lineId);
    sb.append(", lineName=").append(lineName);
    sb.append(", serialVersionUID=").append(serialVersionUID);
    sb.append("]");
    return sb.toString();
  }
}
